package com.sunyard.dal.bo.operator;

import com.sunyard.constant.manage.RegexConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author jiy.fang
 * @ClassName OperatorAddBO
 * @Description description
 * @date 2019/7/23 17:16
 */
@Data
@ApiModel
@ToString
public class OperatorAddBO implements Serializable {

    private static final long serialVersionUID = 8907070360400864315L;

    @ApiModelProperty(value = "用户姓名")
    @NotBlank(message = "用户姓名不能为空")
    @Size(max = 15, message = "用户姓名在15字符以内")
    private String opRealname;

    @ApiModelProperty(value = "用户编号")
    @NotBlank(message = "用户编号不能为空")
    @Pattern(regexp = RegexConst.OP_NAME, message = "用户编号为1-30个字符")
    @Size(max = 30, message = "用户编号为1-30个字符")
    private String opName;

    @ApiModelProperty(value = "所属机构")
    @NotBlank(message = "所属机构不能为空")
    private String orgId;

    @ApiModelProperty(value = "所属角色", required = true)
    @NotBlank(message = "所属角色不能为空")
    private String roleId;

    @ApiModelProperty(value = "角色名称", required = true)
    private String roleName;

    @ApiModelProperty(value = "联系方式")
    //@NotBlank(message = "联系方式不能为空")
    // @Pattern(regexp = RegexConst.TEL_MOBILE, message = "手机号或座机号不正确, 座机要填写区号")
    @Size(max = 30, message = "联系方式为1-30个字符")
    private String opTel;

    @ApiModelProperty(value = "登录类型 1-密码 2-指纹")
    @Pattern(regexp = RegexConst.LOGIN_TYPE, message = "登录类型只能是1或2")
    @NotBlank(message = "登录类型不能为空")
    private String loginType;

    @ApiModelProperty(value = "指定审核人")
    private String auditor;

    @ApiModelProperty(value = "审核类型")
    private String auditType;

}
